package cn.easy.rpc.services;

import cn.easy.rpc.annotations.RpcInstance;
import cn.easy.rpc.common.UserService;
import cn.easy.rpc.dto.User;
import com.google.common.collect.Lists;

import java.util.List;

/**
 * @author zwb
 * @create 2020-09-07 19:51
 **/
@RpcInstance(schema = "user")
public class UserServiceImpl implements UserService {
    @Override
    public User getUser(String userName, Integer age) {
        return new User(userName,age);
    }

    @Override
    public List<User> userList() {
        List<User> list = Lists.newArrayList();
        list.add(new User("zhf", 18));
        list.add(new User("zwb", 18));
        list.add(new User("lp", 99));
        list.add(new User("pys", 199));
        return list;

    }
}
